Skip to main content

ProgressBar

Detailed Description

ProgressBar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running.
The user can change the range of the progress bar by setting the maximum and minimum properties, it will display the percentage that have been completed.

Example code

In the code below, you will create a progress bar:

const desktop = Desktop.instance();
const progressbar = new ProgressBar(desktop);
progressbar.value = 68;

You can change the format of the text:

const desktop = Desktop.instance();
const progressbar = new ProgressBar(desktop);
progressbar.formatter = (value: number): string => { return value.toString() + ' / 100'; };
progressbar.value = 68;

If you want to hide the text, you can set the textVisible property to false:

const desktop = Desktop.instance();
const progressbar = new ProgressBar(desktop);
progressbar.value = 68;
progressbar.textVisible = false;